import request_send
import lxml.etree as etree

url = "https://www.xmwav.com/mscdetail/137351.html"

headers = {
    "User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36 Edg/122.0.0.0"
}

response = request_send.send_request(url, headers=headers)

tree = etree.HTML(response)

title_1 = tree.xpath('//h1[@class="title"]/text()')

title_2 = tree.xpath('//h1[@class="title"]/following-sibling::h2[1]/text()')

title = title_1[0] + title_2[0]

link = tree.xpath('//div[@class="info-zi mb15"]/a[3]/@href')

description_1 = tree.xpath('//div[@class=" sx mb15"]/h2')
description_2 = tree.xpath('//div[@class="lrc"]//article//text()')

description = description_1[0].text + "".join(description_2)

print(title)
print(link)
print(description)
